package com.bjpowerndoe.ylb.web.model.param;

import cn.hutool.core.util.PhoneUtil;
import cn.hutool.core.util.StrUtil;
import lombok.Data;

/**
 *
 */
@Data
public class UserParam {
    private String phone;
    private String secret;
    private String code;

    public boolean checkData(){
        if( !PhoneUtil.isPhone(phone)){
            return false;
        }

        if(StrUtil.isBlank(secret) || secret.length() != 32){
            return false;
        }

        if( StrUtil.isBlank(code) || code.length() != 4){
            return false;
        }

        return true;
    }

}
